package org.example.service.serviceImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.entity.Pub;
import org.example.mapper.PubMapper;
import org.example.service.IPubService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PubServiceImpl extends ServiceImpl<PubMapper, Pub> implements IPubService{
    @Autowired
    private PubMapper pubMapper;

    @Override
    public List<Pub> selectListById(Integer areaId) {
        return pubMapper.selectListById(areaId);
    }

    @Override
    public List<Pub> selectListByBrand(Integer area,String brand) {
        return pubMapper.selectListByBrand(area,brand);
    }

    @Override
    public List<Pub> selectList(Integer area, String brand, String rank) {
        return pubMapper.selectList(area,brand,rank);
    }

    @Override
    public Pub selectPubById(Integer pubId, Integer userId) {
        return pubMapper.selectPubById(pubId, userId);
    }

    @Override
    public List<Pub> getPubRoomByPubId(Integer pubId) {
        return pubMapper.getPubRoomByPubId(pubId);
    }
//    @Override
//    List<Pub> getPubRoomByPubId(Integer pubId) {
//        return pubMapper.getPubRoomByPubId(pubId);
//    }
}
